<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/mechanica_xx/Mechanica_xx.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demo/mechanica_xx/Mechanica_xx.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '设备详细',
                name: 'mechanica_xx/Mechanica_xx',
                url: "/Mechanica_xx/",
                sortName: "id"
            });
            const editFormFields = ref({"sbbm":"","sbtp2":"","sbxh":"","sbtp":""});
            const editFormOptions = ref([[{"dataKey":"设备类型2","data":[],"title":"设备编码","field":"sbbm","type":"select"},
                               {"title":"设备图片2","field":"sbtp2"}],
                              [{"title":"设备型号","field":"sbxh"}],
                              [{"title":"","field":"sbtp"}]]);
            const searchFormFields = ref({"sbmc":"","sbbm":"","sbxh":""});
            const searchFormOptions = ref([[{"title":"设备名称","field":"sbmc"},{"dataKey":"设备类型2","data":[],"title":"设备编码","field":"sbbm","type":"select"},{"title":"设备型号","field":"sbxh"}]]);
            const columns = ref([{field:'id',title:'id',type:'int',width:110,require:true,align:'left',sort:true},
                       {field:'sbmc',title:'设备名称',type:'string',width:220,align:'left'},
                       {field:'sbbm',title:'设备编码',type:'string',bind:{ key:'设备类型2',data:[]},width:220,align:'left'},
                       {field:'sbxh',title:'设备型号',type:'string',width:220,align:'left'},
                       {field:'sbtp',title:'sbtp',type:'string',width:220,align:'left'},
                       {field:'record_id',title:'record_id',type:'int',width:110,align:'left'},
                       {field:'sbtp1',title:'设备图片1',type:'string',width:220,align:'left'},
                       {field:'sbtp2',title:'设备图片2',type:'string',width:220,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
